package com.ruoyi.common.entity.CoreEntity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户商品收藏记录对象 favorites
 * 
 * @author 亢哲
 * @date 2025-08-07
 */
public class Favorites extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 收藏记录ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long membersId;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 收藏时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "收藏时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setMembersId(Long membersId) 
    {
        this.membersId = membersId;
    }

    public Long getMembersId() 
    {
        return membersId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

//    //查询收藏商品信息，应该是收藏表绑定商品表数据，通过商品ID查询收藏信息
//    public List<Favorites> selectFavoritesByProductId(Long productId);

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("membersId", getMembersId())
            .append("productId", getProductId())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
